<template>
  <div class="container">
    <h3>新增专业</h3>
    名称：
    <el-input size="small " type="text" v-model="subjects.name" /> <br />
    <br />
    <el-button type="primary" @click="add">新增专业</el-button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      subjects: {},
    };
  },
  methods: {
    add() {
      this.$api.subjectApi.addSubject(this.subjects).then(({ data }) => {
        this.$message.success(data.message);
        // console.log(data);
      });
    },
  },
};
</script>

<style scoped>
.img {
  margin-bottom: 10px;
}
.container {
  background-color: #fff;

  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  padding: 30px;
}
</style>
